#pragma once
#include "drawable.h"
#include "base.h"

#include <string>
#include <vector>

enum class actor_type
{
	none = -1,		   //非法值
	player = 0,		   //玩家
	ground_item = 1,   //地面物体 门 隐形路径 隐形墙 门卫 上下楼梯 炼丹炉 云雾
	property_item = 2, //属性物品 火眼金睛 玄明石 金刚丹
	equipment = 4,	   //装备
	monster = 8,	   //怪物
	business_man = 16, //商人
	npc = 32,		   //NPC
};

/**
 * actor类
 */
class actor : public drawable
{
	friend class ResourceMgr;

public:
	actor(actor_type type);
	//绘制函数
	virtual void draw(const point& pos, int frame_index, int offset_y) override;

protected:
	actor_type _type = actor_type::none; //默认为无效值
	std::string _name;
	std::string _resourceName;
	int _width;
	int _height;

	std::vector<int> _animations;
};

/**
 * @brief 玩家对象，包含了更多的属性
 * 
 */
class PlayerActor : public actor
{
public:
	PlayerActor();

private:
	int _hp;
	int _mp;
	int _def;
};

class tileActor : public actor
{
public:
	tileActor();
};

class itemActor : public actor
{
public:
	itemActor();
};

class equipmentActor : public actor
{
public:
	equipmentActor();
};

class enemyActor : public actor
{
public:
	enemyActor();
};

class shopNpcActor : public actor
{
public:
	shopNpcActor();
};

class npcActor : public actor
{
public:
	npcActor();
};